#!/bin/bash

source ~/.bashrc

function isCmdExist() {
	local cmd="$1"
  	if [ -z "$cmd" ]; then
		echo "Usage isCmdExist yourCmd"
		return 1
	fi

	which "$cmd" >/dev/null 2>&1
	if [ $? -eq 0 ]; then
		return 0
	fi

	return 2
}

fprcExist=`isCmdExist frpc`
if [ $? -ne "0" ]; then
	echo "frpc no installed, please install frpc first."
	exit 0
fi

nohup frpc -c frp_minio_web.ini > frp_minio_web.log 2>&1 &
